#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：auto-test 
@File    ：OrderPage.py
@Author  ：赵加响
@Date    ：2022/12/27 10:52 
@Desc    ：
"""

from selenium.webdriver.common.by import By

from base.OrderBase import OrderBase
from base.ObjectMap import ObjectMap


class OrderPage(ObjectMap, OrderBase):
    def click_order_info(self, driver, tab_name):
        """
        点击订单tab栏按钮
        :param driver:
        :param tab_name:
        :return:
        """
        tab_xpath = self.order_type(tab_name)
        return self.element_click(driver, By.XPATH, tab_xpath)
